//
//  CharacterView.m
//  PacIsBack
//
//  Created by Simon André on 04/02/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import "CharacterView.h"
#import "CharacterViewController.h"


@implementation CharacterView

@synthesize controller;

- (id)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        // Initialization code
    }
    return self;
}

- (id)initWithFrame:(CGRect)frame andController:(CharacterViewController*) viewController{
	if (self = [super initWithFrame:frame]) {
        [self setController:viewController];
		self.backgroundColor = [UIColor clearColor];
    }
    return self;
}


- (void)drawRect:(CGRect)rect {
    // Drawing code
	[super drawRect:rect];
}


- (void)dealloc {
	[self setController:nil];
	[super dealloc];
}

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
	[controller trySelecting];
}

@end
